﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace CTM.Web.Models.Input
{
    public class Conversation
    {
        #region Properties

        [Key]
        public Guid Id { get; set; }

        [Required]
        public string Description { get; set; }

        public bool IsDeleted { get; set; }

        public DateTime CreatedOn { get; set; }

        public Guid CreatedBy { get; set; }

        public DateTime ModifiedOn { get; set; }

        public Guid ModifiedBy { get; set; }

        #endregion

        #region Relationship
        public virtual ConversationType Type { get; set; }
        public virtual ICollection<ConversationComment> Comments { get; set; }
        public virtual ICollection<ConversationTag> Tags { get; set; }
        #endregion

        public Conversation()
        {
            IsDeleted = false;
            CreatedOn = DateTime.UtcNow;
            ModifiedOn = DateTime.UtcNow;
            Comments = new HashSet<ConversationComment>();
            Tags = new HashSet<ConversationTag>();
        }
    }
}